<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>
<f:view xmlns:f="http://java.sun.com/jsf/core"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:c="http://java.sun.com/jstl/core"
        xmlns:af="http://myfaces.apache.org/trinidad"
        xmlns:afh="http://myfaces.apache.org/trinidad/html">
    <f:loadBundle basename="ProcessPortalMessages" var="localeBundle" />
    <f:loadBundle basename="CommonMessages" var="commonMsg" />
    <af:document title="#{localeBundle.activityMetadataDlg}">
        <af:form>
            <af:panelPage>
                <f:facet name="messages">
                    <af:messages id="globalDialogMessages"/>
                </f:facet>
                <f:facet name="navigation2">
                    <af:navigationPane hint="bar" styleClass="activityDetailNavBar">
                        <af:commandNavigationItem id="close-button"
                            text="#{commonMsg.close}"
                            immediate="true">
                            <af:returnActionListener value="#{null}"/>
                        </af:commandNavigationItem>
                    </af:navigationPane>
                </f:facet>
                <af:spacer height="10px"/>
                <af:panelBox 
                  text="#{commonMsg.activityInstanceData}" background="light" >
                  <af:panelFormLayout>
                     <af:inputText label="#{commonMsg.processOID}:"
                        value="#{activityMetadataDialog.currentActivityInstance.processInstanceOID}"
                        readOnly="true" />
                     <af:inputText label="#{commonMsg.processName}:"
                        value="#{activityMetadataDialog.currentActivityInstance.processDefinitionId}"
                        readOnly="true" />
                     <af:inputText label="#{commonMsg.activityOID}:"
                        value="#{activityMetadataDialog.currentActivityInstance.OID}"
                        readOnly="true" />
                     <af:inputText label="#{commonMsg.activityName}:"
                        value="#{activityMetadataDialog.currentActivityInstance.activity.name}"
                        readOnly="true" />
                     <af:inputDate label="#{commonMsg.started}:"
                        value="#{activityMetadataDialog.currentActivityInstance.startTime}"
                        readOnly="true" />
                     <af:inputDate label="#{commonMsg.lastModified}:"
                        value="#{activityMetadataDialog.currentActivityInstance.lastModificationTime}"
                        readOnly="true" />
                     <af:inputText label="#{localeBundle.delegatedBy}:"
                        value="#{activityMetadataDialog.delegatedByPerformerName}"
                        readOnly="true" />
                  </af:panelFormLayout>
                </af:panelBox>
                <af:spacer height="10px"/>
                <af:panelBox text="#{localeBundle.descriptors}" rendered="#{not empty activityMetadataDialog.descriptors}">
                    <af:panelFormLayout width="100%">
                       <c:forEach var="dataItem" varStatus="iter" items="#{activityMetadataDialog.descriptors}" >
                           <ui:include src="/carnot/include/input-field.xhtml">
                              <ui:param name="fieldModel" value="#{dataItem}" />
                              <ui:param name="index" value="#{iter.index}" />
                              <ui:param name="showStructuredTypeAsTextField" value="true"/>
                           </ui:include>
                       </c:forEach>
                    </af:panelFormLayout>
                </af:panelBox>
            </af:panelPage>
        </af:form>
    </af:document>
</f:view>